/*
 * @Author: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
 * @Date: 2024-12-10 19:57:13
 * @LastEditors: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
 * @LastEditTime: 2024-12-11 18:20:18
 * @FilePath: /vue-element-admin/src/api/retailServicePlan.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import request from '@/utils/request'

/*
* 服务方案
*  */

export const retailServicePlanListQuery = (params) => {
  return request({
    url: `/retailPlan/listQuery/listQuery?pageNum=${params.pageNum ? params.pageNum : 1}&pageSize=${params.pageSize ? params.pageSize : 10}&id=${params.id ? params.id : ''}&name=${params.name ? params.name : ''}`,
    method: 'get'
  })
}


export function retailServicePlanList(query) {
  return request({
    url: '/retailPlan/list',
    method: 'get',
    params: query


  })
}


// export const retailServicePlanList = (params) => {
//   return request({
//     url: `/retailPlan/list?id=${params.id ? param.id : ''}&name=${params.name ? params.name : ''}`,
//     method: 'get'
//   })
// }

export const retailServicePlanGetEntityById = (id) => {
  return request({
    url: `/retailPlan/getEntityById/${id}`,
    method: 'get'
  })
}
export const retailServicePlanAdd = (data) => {
  return request({
    url: '/retailPlan/add',
    method: 'post',
    data
  })
}

export const retailServicePlanUpdate = (data) => {
  return request({
    url: '/retailPlan/update',
    method: 'put',
    data
  })
}

export const retailServicePlanRemove = (id) => {
  return request({
    url: `/retailPlan/delete?id=${id}`,
    method: 'delete'
  })
}
